/*
 * TODO: Enter copyright statement here.
 */
package com.googlecode.wcbunittests.helloworld.element;

import java.util.Calendar;

import nl.gx.webmanager.cms.element.implementation.ElementFBO;
import nl.gx.webmanager.springmvc.DelegatedController;

import com.googlecode.wcbunittests.helloworld.api.WCBConstants;

/**
 * Implementation of the form backing object for editing the element in
 * the edit environment.
 */
public class HelloWorldElementFBO extends ElementFBO {
    // Property containing the date of the element
    private Calendar myDate;

    /**
     * Constructor of the HelloWorld element form backing object.
     * @param controller Controller that creates and manages this form backing object
     */
    public HelloWorldElementFBO(DelegatedController controller) {
        super(controller);
    }

    /**
     * Returns the date of the element. The date is always in the past.
     * @return the date of the element, date is always in the past
     */
    public Calendar getDate() {
        return myDate;
    }

    /**
     * Sets the date of the element. The date is always in the past.
     * @param date the date on the element to set, date is always in the past
     */
    public void setDate(Calendar date) {
        myDate = date;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getHelpTopicsId() {
        return WCBConstants.OH_ANCHOR_INTRODUCTION;
    }
}